package PTA.Mianxiangduixiang.ex30;

import java.util.Scanner;

class Fan{
    public final int SLOW=1;
    public final int MEDIUM=2;
    public final int FAST=3;
    private int speed=SLOW;
    private boolean on = false;
    private double radius = 5;
    private String color = "white";

    public Fan() {
    }
    public Fan(int fanSpeed,boolean fanOn,double fanRadius,String fanColor)
    {
        speed = fanSpeed;
        on = fanOn;
        radius = fanRadius;
        color = fanColor;

    }

    @Override
    public String toString() {
        String s="speed "+speed+"\n";
        s+="color "+color+"\n";
        s+="radius "+radius+"\n";
        if(on==false) {
            s+="fan is off";
        }else {
            s+="fan is on";
        }

        return s;
    }
}





public class ex30 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("-------\n"
                + "Default\n"
                + "-------");
Fan f1 = new Fan();
        System.out.println(f1.toString());
        System.out.println("-------\n"
                + "My Fan\n"
                + "-------");
        int fs = sc.nextInt();
        boolean fo = sc.nextBoolean();
        double fr = sc.nextDouble();
        String fc = sc.next();
        Fan f2 = new Fan(fs,fo,fr,fc);
        System.out.println(f2.toString());

    }
}
